<?php
/**
 * Created by PhpStorm.
 * User: Thans
 * Date: 2018/8/12
 * Time: 17:46
 */

namespace app\admin\validate;


use think\Validate;

class LanguageValidate extends Validate
{
    protected $rule = [
        'name' => 'require|min:2|max:10',
        'code' => ['require', 'regex' => '/^[\w,-]{2,10}/'],
    ];
    protected $message = [
        'name' => '语言名称长度在2-10位之间',
        'code' => '语言代码必须在2-10位，且为数字、下划线或字母',
    ];

}